package com.czxy.Demo23;

public class Dog extends Animal {
    private int age;

    public Dog() {
    }

    public Dog(int age) {
        this.age = age;
    }

    public Dog(String id, String name, int age) {
        super(id, name);
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Dog{" +
               getId() + " , " +
               getName() + " , " +
               age +
               '}';
    }
}
